#include "QtCellSprite.h"

QtCellSprite::QtCellSprite(QtSprite *parent): QtPixmapSprite(parent), bg(0)
{
	SetDepth(1);

	bg = new QtPixmapSprite();
	bg->SetDepth(0);

	AddSprite(bg);

	SetResource("background", "cellbackground");
	AddResourceSpecification("background", "normal");
}

QtCellSprite::~QtCellSprite()
{
	if (bg)
	{
		delete bg;
		bg = 0;
	}
}


void QtCellSprite::SetBackground(const QPixmap& background)
{
	if (bg)
	{
		bg->SetPixmap(background);
		BackgroundUpdated();
	}
}

QtPixmapSprite* QtCellSprite::Background() const
{
	return bg;
}

void QtCellSprite::BackgroundUpdated()
{
}



